home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 151-175 / disk_166 / autograf / readme < prev    next >
Text File  |  1992-05-06  |  5KB  |  125 lines

  1.                      AutoLog Programs
  2.                       by  Joel Swank
  3.                       September 1988
  4.  
  5.     Here is a set of programs that extract and display data from a file of
  6. auto log records. Each record represents a gasoline purchase. There are 3
  7. programs: checkup, averages and autograf.
  8.  
  9.  
  10.     Checkup is a file validator that checks the integrity of the
  11. data file. It is a cli only program. Its only command line parameter is 
  12. the name of the data file. Its output will be a listing of any errors and
  13. the records containing them. If the file is OK there will be no output.
  14.  
  15.  
  16.     Averages is a CLI only program that prints out a list of totals and
  17. averages for the data file. It prints total miles, cost, and gallons.
  18. It also prints averages cost/mile, mile/gallon and price/gallon. If requested
  19. it will also print the maximum price/gallon, cost and number of gallons and
  20. the minimum price/gallon.
  21.  
  22.         usage:averages [-snn] [-enn] [-ynn] [-m] [-?] [file ...]
  23.         
  24.         Options:
  25.         ynn  - for requested year only.
  26.         snn  - year to start.
  27.         enn  - year to end.
  28.         m    - include max and min information.
  29.         ?    - display this list.
  30.  
  31.  
  32.    AutoGraf reads the autolog datafile to construct 3 types of graphs: 
  33. cost per mile in cents per mile, price per gallon in dollars per gallon, 
  34. and miles per gallon. AutoGraf can be started by clicking its icon or by CLI
  35. command. Autograf has a 7 item menu: Read File, Draw Graph, Averages,
  36. Set Options, Print Window, Help, and Quit. DrawGraph and Averages are 
  37. disabled until a file has been read. The settings in the options window 
  38. determine how the graphs are drawn. You can read in a data file and then 
  39. graph it different ways. The options window has gadgets that allow you to 
  40. select which types of  graphs you would like to see. It also allows you to 
  41. restrict the data  graphed to a particular range of years using the start 
  42. and end year gadgets. Select the desired options and click 'OK'. When you 
  43. select Read File, you will select a file using the Fileio requester by R.J.
  44. Mical. A sample file named '77pont' is included. After the data is read, you 
  45. can use Draw Graph or Averages to see the data. When a graph is displayed, 
  46. two gadgets will be available. Click the 'NEXT' gadget if you have requested 
  47. more than 1 type of graph. Click the 'DONE' gadget to enable the menu. While
  48. a graph is on the screen you can see the value of any point on the trace
  49. by moving the mouse to it. The Print Window item is available to dump 
  50. graphics or text to the printer.  The Help menu item displays this 
  51. information, Quit ends the program. Click  the Close Gadget at any time 
  52. to end the program.
  53.  
  54.  
  55. Notes on AutoGraf: All graphs are drawn with one X point for each record in 
  56. the file. The X labels are the years. The size of a year will vary with the
  57. number of entries for that year. The price/gallon graph plots the exact
  58. price of each entry. Both of the other graphs plot the average for the
  59. most recent 10 entrys. This is to keep partial fillups from skewing the
  60. graph as badly (they will have some effect, especially near the beginning
  61. of the data).
  62.  
  63.  
  64. FILE FORMAT
  65.  
  66.    The data file is an ASCII character file with integer, character 
  67. and floating point data items. Individual fields separated by commas.
  68. It was created by a SuperBase Export command. The fields are:
  69.  
  70.    * date - character format (MMM DD YYYY)
  71.    * odometer reading - 999999.9
  72.    * price per gallon - $9.999          } leading dollar sign required 
  73.    * Total cost of purchase - $9999.99  } for both of these fields.
  74.    * gallons - 999.9
  75.    * place and brand of gas - character
  76.  
  77. FILE Notes:
  78.  
  79.  * odometer reading can be whole miles or tenths.
  80.  
  81.  * only the year of the date field is used. It must be the last 4
  82.    characters of the date field.
  83.  
  84.  * The gallons number is not used by these programs. Gallons is
  85.    computed by cost/price on the assumption that they are more accurate
  86.    and the fact that gallons is a computed field in Superbase.
  87.  
  88. Printing Graphs:
  89.  
  90.     The Print Window menu item can be used to do a graphic dump of the
  91. autograf window. You may have to adjust your printer preferences to get
  92. a reasonable printout. I found 'Negative' image, 'Black & White' shade
  93. and a threshold of 5 to work well on my setup.
  94.  
  95. Restrictions and Limits:
  96.  
  97.     To be acceptable to these programs the data records must be in
  98. ascending order by odometer reading and year. This is to help spot data
  99. entry errors. The price and cost fields must contain a leading dollar sign.
  100. Autograf can accomidate files of up to 1000 records. Autograf reports
  101. file format errors and other errors in a requester.
  102.  
  103. Compiling:
  104.  
  105.     Source for all code except the fileio requester is provided. A
  106. makefile for manx is included. I have no idea what it would take to
  107. compile with lattice. 32 bit integers are required because fileio
  108. requires them. Fileio is linked in from a library compiled from
  109. the fileio source provided by R.J Mical in Prosuite on Fish disk
  110. 107. The include files fileio.h, prosuite.h, pointers.h, and reqsupp.h
  111. are also needed.
  112.  
  113. Superbase Files:
  114.  
  115.     Included are the superbase files that provide a skeleton of the
  116. file used to create '77pont'. They are autolog.2, autolog.sbf, and 
  117. autolog.sbd. These can be copied to a superbase directory and used
  118. to enter  data and create ASCII data files with the Superbase Export
  119. command. Superbase Import command can be used to input the '77pont' file.
  120.  
  121. Copyright:
  122.  
  123.     All code in these files is uncopyrighted, public domain, no rights
  124. reserved.
  125.